﻿using netcore_service.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace netcore_service.IService
{
    public interface IChatService
    {
        Task<ChatSession> CreateSessionAsync(string customerId, string customerName,string school,string schoolName, string logo, string? initialMessage = null);
        Task<ChatSession?> AcceptSessionAsync(string sessionId, string agentId,string agentName, string school);
        Task<Message> SendMessageAsync(string sessionId, string senderId, string senderName,string Logo, string content, MessageType messageType = MessageType.Text);
        Task<List<ChatSession>> GetWaitingSessionsAsync( string school);
        Task<List<ChatSession>> GetUserSessionsAsync(string userId);
        Task<List<Message>> GetSessionMessagesAsync(string sessionId, int count = 20);
        Task<bool> CloseSessionAsync(string sessionId);
        Task MarkMessagesAsReadAsync(string sessionId, string userId);
        Task<ChatSession> GetUserSessionsByCustomer(string userId);
        Task<List<ChatSession>> GetScoolSessionsAsync(string userId);
        Task<List<ChatSession>> SchoolSessionsByCustomer(string userId);
    }
}
